package com.wgu.modules.service.utils;

/**
 * @Author: w
 * @Date: 2019/7/4 15:23
 * @Version 1.0
 */
public final class BookUtil {
    /**
     * 关键词移除空格并用 || 代替
     * @param str
     * @return
     */
    public static String wordRemoveSpaces(String str){
        String[] strs = str.split("\\s+");
        StringBuilder stringBuilder = new StringBuilder();
        for(String s:strs){
            stringBuilder.append(s).append("||");
        }
        return stringBuilder.toString();
    }
}
